package com.regent.central.bill.service.mrp;

import com.regent.central.bill.core.mrp.BillMaterialReturn;
import com.regent.central.bill.repository.mrp.dto.billReturn.BillMaterialReturnPageDTO;
import com.regent.central.bill.repository.mrp.dto.billReturn.BillMaterialReturnPageParam;
import com.regent.central.bill.repository.mrp.dto.billReturn.BillReturnUndoResult;
import com.regent.central.bill.repository.mrp.dto.billReturn.collect.BillMaterialReturnCollectAddDTO;
import com.regent.central.bill.repository.mrp.dto.billReturn.create.BillMaterialReturnAddDTO;
import com.regent.central.bill.repository.mrp.dto.billReturn.detail.BillMaterialReturnDetailDTO;
import com.regent.central.bill.repository.mrp.dto.billReturn.detail.ReturnDetailsSkuDTO;
import com.regent.central.infrastructure.service.DomainService;

import java.util.List;

public interface BillMaterialReturnService extends DomainService<BillMaterialReturn> {

    /**
     * 新建物料退料单
     *
     * @param dto
     */
    void create(BillMaterialReturnAddDTO dto);

    /**
     * 退料单详情
     *
     * @param billMaterialArriveId
     */
    BillMaterialReturnDetailDTO detail(String billMaterialArriveId);

    /**
     * 增加收退款记录
     * @param collectAdd
     */
    void createCollectMoney(BillMaterialReturnCollectAddDTO collectAdd);

    /**
     * 撤销退料单
     *
     * @param billMaterialReturnId 退料的ID
     */
    BillReturnUndoResult undo(String billMaterialReturnId, String userId);

    /**
     * 分页查询退料单列表
     * @param param
     * @return
     */
    BillMaterialReturnPageDTO findPage(BillMaterialReturnPageParam param);

    /**
     * 查询退料单列表
     * @param param
     * @return
     */
    List<ReturnDetailsSkuDTO> returnExcel(BillMaterialReturnPageParam param);
}